Remus: remove Py_RETURN_NONE for Python 2.3
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 23 Nov 2009 07:10:56 +0000 (07:10 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 23 Nov 2009 07:10:56 +0000 (07:10 +0000)
Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
tools/python/xen/lowlevel/checkpoint/checkpoint.c
tools/python/xen/lowlevel/netlink/netlink.c

index bdd82be1807e6223e91848d7622c514ddf01b41c..7545d7deb6652e0c213936963b11f28d444d50e3 100644 (file)
@@ -72,7 +72,8 @@ static PyObject* pycheckpoint_open(PyObject* obj, PyObject* args)
     return NULL;
   }
 
-  Py_RETURN_NONE;
+  Py_INCREF(Py_None);
+  return Py_None;
 }
 
 static PyObject* pycheckpoint_close(PyObject* obj, PyObject* args)
@@ -88,7 +89,8 @@ static PyObject* pycheckpoint_close(PyObject* obj, PyObject* args)
   Py_XDECREF(self->checkpoint_cb);
   self->checkpoint_cb = NULL;
 
-  Py_RETURN_NONE;
+  Py_INCREF(Py_None);
+  return Py_None;
 }
 
 static PyObject* pycheckpoint_start(PyObject* obj, PyObject* args) {
@@ -163,7 +165,8 @@ static PyObject* pycheckpoint_start(PyObject* obj, PyObject* args) {
     goto err;
   }
 
-  Py_RETURN_NONE;
+  Py_INCREF(Py_None);
+  return Py_None;
 
   err:
   self->suspend_cb = NULL;
index e5cfb3edf1f7e309bebf43e6fd09acaae50010a4..c48b8e4990616f8829992b865474d8838b3fbcca 100644 (file)
@@ -55,7 +55,8 @@ static PyObject* pyrtnl_talk(PyObject* obj, PyObject* args)
     return NULL;
   }
 
-  Py_RETURN_NONE;
+  Py_INCREF(Py_None);
+  return Py_None;
 }
 
 static PyObject* pyrtnl_wilddump_request(PyObject* obj, PyObject* args)
@@ -71,7 +72,8 @@ static PyObject* pyrtnl_wilddump_request(PyObject* obj, PyObject* args)
     return NULL;
   }
 
-  Py_RETURN_NONE;
+  Py_INCREF(Py_None);
+  return Py_None;
 }
 
 static PyObject* pyrtnl_dump_request(PyObject* obj, PyObject* args)
@@ -89,7 +91,8 @@ static PyObject* pyrtnl_dump_request(PyObject* obj, PyObject* args)
     return NULL;
   }
 
-  Py_RETURN_NONE;
+  Py_INCREF(Py_None);
+  return Py_None;
 }
 
 /* translate args to python and call python callback */
@@ -133,7 +136,8 @@ static PyObject* pyrtnl_dump_filter(PyObject* obj, PyObject* args)
   }
   Py_DECREF(filter);
 
-  Py_RETURN_NONE;
+  Py_INCREF(Py_None);
+  return Py_None;
 }
 
 static PyMethodDef PyRtnl_methods[] = {